using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class JobSeekers_education : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session.Contents["jsuserid"] == null)
        {
            Response.Redirect("login.aspx");
        }
    }

    protected void btnNext_Click(object sender, EventArgs e)
    {
        Response.Redirect("experience.aspx");
    }
    protected void btnMore_Click(object sender, EventArgs e)
    {
        SQLServerClass cls = new SQLServerClass();
        if (!cls.AddNewUpdateEducation("0",
        Convert.ToString(Session.Contents["jsuserid"]),
        txtSchool.Text,
        ddlCountry.SelectedValue,
        txtFaculty.Text,
        txtMajor.Text, rblMode.SelectedValue,
        txtFrom.Text,txtTo.Text,txtDescription.Text))
            literalError.Text = "Error: " + cls.ErrorMessage;  
        else
            Response.Redirect("education.aspx");
    }
    protected void btnSave_Click(object sender, EventArgs e)
    {
        SQLServerClass cls = new SQLServerClass();
        if (!cls.AddNewUpdateEducation("0",
        Convert.ToString(Session.Contents["jsuserid"]),
        txtSchool.Text,
        ddlCountry.SelectedValue,
        txtFaculty.Text,
        txtMajor.Text, rblMode.SelectedValue,
        txtFrom.Text, txtTo.Text, txtDescription.Text))
            literalError.Text = "Error: " + cls.ErrorMessage;
        else
            Response.Redirect("experience.aspx");
    }
}
